<!DOCTYPE html>
<html lang="en">
<head>
<title><#:C('sitename')#>--代理商平台</title>
<meta name="keywords" content="<#:C('keyword')#>"/>
<meta name="description" content="<#:C('content')#>"/>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<include file="Pub:Css"/>
<link rel="stylesheet" href="<#$Theme['P']['root']#>/matrix/css/uniform.css" />
<link rel="stylesheet" href="<#$Theme['P']['root']#>/matrix/css/select2.css" />
</head>
<body>
<include file="Pub:top"/>
<include file="Pub:Nav"/>
<!--main-container-part-->
<div id="content">
  <!--breadcrumbs-->
    <div id="content-header">
        <div id="breadcrumb">
            <a href="<#:U('index/index')#>" title="返回首页" class="tip-bottom"><i class="icon-home"></i>首页</a>
            <a href="#" class="current">编辑广告</a>
        </div>
        <h1>编辑广告</h1>
    </div>
    <!--End-breadcrumbs-->
    <div class="container-fluid" >
        <hr>
        <div class="row-fluid">
            <div class="span8">
                <div class="widget-box">
                    <div class="widget-title">
                        <span class="icon"><i class="icon-align-justify"></i></span>
                        <h5>编辑广告</h5>
                    </div>
                    <div class="widget-content nopadding">
                        <form name="doad"  action="__URL__/editad"  method="post" enctype="multipart/form-data" class="form-horizontal">
                            <div class="control-group">
                                <div class="alert span9" style="display: none;margin: 10px 0 10px 150px;">
                                    <span id="alertmsg"></span>
                                </div>
                            </div>    
                            <div class="control-group">
                                <label class="control-label">广告位置:</label>
                                <div class="controls">
                                    <label class="radio">
                                        <input type="radio" name="ad_pos" id="status1" value="1" checked />
                                            首页
                                    </label>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">广告类别:</label>
                                <div class="controls">
                                    <label class="radio">
                                        <input type="radio" name="mode" value="1" <eq name="info['mode']" value="1">checked</eq> />
                                            图片广告
                                    </label>
                                    <label class="radio">
                                        <input type="radio" name="mode" value="0" <eq name="info['mode']" value="0">checked</eq>/>
                                                图文广告
                                    </label>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">标题:</label>
                                <div class="controls">
                                    <input class="span11" type="text"  data-toggle="tooltip" data-trigger="focus" title="请输入标题" data-placement="right" name="title" id="title" value="<#$info['title']#>"/>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">内容:</label>
                                <div class="controls">
                                    <textarea class="textarea_editor span11" rows="20" placeholder="输入内容 ..." name="info"><#$info.info|htmlspecialchars_decode#></textarea>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">排序:</label>
                                <div class="controls">
                                    <input class="span11" type="text"  data-toggle="tooltip" data-trigger="focus" title="请输入广告排序：数字越大越靠后" data-placement="right" name="ad_sort" id="ad_sort" value="<#$info['ad_sort']#>"/>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">广告图片:</label>
                                <div class="controls">
                                    <img src="<#$info['ad_thumb']#>" style="width:200px;"/></br>
                                </div>
                            </div>
                                <div class="control-group">
                                    <label class="control-label">上传新的广告图片:</label>
                                    <div class="controls">
                                        <input type="file"  name="img" id="upload"/>
                                        <span >上传图片比例建议:760*480</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <input type="hidden" name="id" value="<#$info.id#>">　
                                    <input type="submit" class="btn btn-success" id="btn_save" value="保存信息" style="margin: 20px;">
                                    <a class="btn btn-primary" href="<#:U('shopad')#>">返回列表</a>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="span4 column pull-right">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal  hide fade" id="myModal">
    <div class="modal-header">
        <a class="close" data-dismiss="modal">×</a>
        <h3>提示信息</h3>
    </div>
    <div class="modal-body">
        <p>内容</p>
    </div>
    <div class="modal-footer">
        <a href="#" class="btn"  data-dismiss="modal">关闭</a>
    </div>
</div>



    <script src="<#$Theme['P']['root']#>/kindeditor/kindeditor-min.js" type="text/javascript"></script>
    <script src="<#$Theme['P']['root']#>/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
 <script src="<#$Theme['P']['js']#>/jquery.min.js"></script>
     <script src="<#$Theme['P']['root']#>/bootadmin/js/bootstrap.min.js"></script>
    <script src="<#$Theme['P']['root']#>/bootadmin/js/theme.js"></script>
   <script src="<#$Theme['P']['root']#>/matrix/js/matrix.js"></script> 
  <script src="<#$Theme['P']['root']#>/bootadmin/js/jquery.uniform.min.js"></script>
  <script src="<#$Theme['P']['root']#>/bootadmin/js/common.js"></script>
  <script>
        KindEditor.ready(function(K) {
            K.create('textarea[name="info"]', {
                autoHeightMode : true,
                items:['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template',  'cut', 'copy', 'paste',
                        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 
                        'flash', 'media', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                        'anchor', 'link', 'unlink', '|', 'about'],
                        afterUpload:false,
                        allowFlashUpload:false,
                        allowFileUpload:false,
                        allowImageUpload:false,
                        allowMediaUpload:false,
            });
        });
        
    
    </script>
  <script type="text/javascript">

                        $(function () {
                            	$('#adman').trigger('click');
                            // add uniform plugin styles to html elements
                            $("input:checkbox, input:radio,input:file").uniform();

                        });
                    </script>
</body>
</html>
